﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using COFE.Core;
using COFE.Core.Lister;

namespace COFE.Core.Profile
{
    public interface IVolumeManager
    {
        #region Properties

        IUserProfile UserProfile { get; }

        ITempManager TempManager { get; }        

        /// <summary>
        /// Return a list of RootDirectories, which is useful for UI.
        /// </summary>
        IDirectoryInfo[] RootDirectories { get; }

        /// <summary>
        /// Return a list of PrimaryVolumes, which defines the file system.
        /// </summary>
        List<IVolume> PrimaryVolumes { get; }

        /// <summary>
        /// Return a primary or secondary using an id, or null if not found.
        /// </summary>
        /// <param name="listerId"></param>
        /// <returns></returns>
        IVolume this[string listerId, bool lookupPrimary = false, bool lookupSecondary = false] { get; }

        /// <summary>
        /// Return a list of SecondaryVolumes, which convert entries in a file system.
        /// </summary>
        List<IVolume> SecondaryVolumes { get; }

        #endregion

        #region Methods
        ///// <summary>
        ///// Registered a volume.
        ///// </summary>
        ///// <param name="volume"></param>
        ///// <param name="accessMode"></param>
        //void RegisterVolume(string listerKey, IDirectoryLister volume, VolumeAccessMode accessMode);

        ///// <summary>
        ///// Registered a volume, assume accessMode = all.
        ///// </summary>
        ///// <param name="volume"></param>
        ///// <param name="accessMode"></param>
        //void RegisterVolume(IDirectoryLister volume);

        /// <summary>
        /// Register from a volume using a directory listers registered in UserProfile.VolumeRegistrar.        
        /// </summary>
        /// <param name="listerKey"></param>        
        void RegisterVolume(string listerKey);

        ///// <summary>
        ///// Register from a volume using a factory registered in UserProfile.VolumeRegistrar.
        ///// </summary>
        ///// <param name="listerKey"></param>
        ///// <param name="accessMode"></param>
        //void RegisterVolume(string factoryKey, string listerKey, VolumeAccessMode accessMode, params string[] parameters);

        #endregion

    }
}
